<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:import url="/mc/common/kindeditor/jsp/kingeditorCommon.jsp?module=banner&textareaName=entity.detail"></c:import>

<div>
	<form id="infoForm" target="hiddenFrame" action="${path}/mc/bannersaveInfo" method="post" enctype="multipart/form-data">
		<input type="hidden" name="entity.id" value="${entity.id}" />
		<input type="hidden" id="hidAdIdStr" name="bl" value="${bl}" id="hidBl">
		<fieldset style="padding-left: 10px;">
			<table>
			  	<tr>
			  		<td>活动广告图片</td>
			  		<td>
			  			<c:import url="/mc/common/imgPreview.jsp?hidName=entity.bannerPic.id&name=bannerPic.file&imgPath=${entity.bannerPic.id}&picId=${entity.bannerPic.id}&index=1" />
			  			 <label style='color:#F80;'>图片建议尺寸：360*180</label>
			  		</td>
			  	</tr>
			  	<tr>
			  		<td>活动标题</td>
			  		<td>
			  			<select id="activityTitle" name="entity.activity.id" class="searchInputAndSelect" style="width: 120px">
			  				<c:if test="${not empty activityList }">
			  						<option value=""  selected>使用banner图文详情</option>
			  					<c:forEach items="${activityList }" var="activity">
				  					<option value="${activity.id }" <c:if test="${activity.id == entity.activity.id }">selected="selected"</c:if> >${activity.title }</option>
			  					</c:forEach>
			  				</c:if>
			  			</select>
			  		<label style='color:#F80;'>温馨提示：活动标题和banner图文只能选择一个哦！同时都有的情况下，banner图文无效！(*^__^*)</label>
					<!-- <label style='color:#F80;'><p/>详情中图片建议尺寸：345*240</label> -->
			  		</td>
			  	</tr>
			  	
			  	<tr id="detailTr">
			  		<td>banner图文详情</td>
			  		<td>
			  			<textarea id="detail" name="entity.detail" rows="5" cols="80" style="width: 100%;height: 400px;visibility: hidden;">${entity.detail}</textarea>
			  		</td>
			  	</tr>
			  	<tr>
			  		<td>优先级</td>
			  		<td>
			  			<input type="text" name="entity.priority" value="<c:choose><c:when test="${empty entity.priority}"></c:when><c:otherwise>${entity.priority}</c:otherwise></c:choose>"
			  				class="{required:true,number:true,messages:{required:'优先级不能为空',number:'请输入数字'}}"> 
			  		</td>
			  	</tr>
		   </table>
		   
		</fieldset>
	</form>
</div>
<!-- <script type="text/javascript">
$(function(){
	$("#activityTitle").change(function(){
		if($(this).val()===""){
			//alert("kong")
			$("#detailTr").removeAttr("style");
			
		}else{
			//alert("feikong")
			$("#detailTr").attr("style","display:none");
		}
	});
});


</script> -->


